package com.ruoyi.web.common;


import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.LinkedHashMap;

/**
 * @Description: 响应返回封装类
 * @Author:
 * @Date: 2020/10/28
 */
@NoArgsConstructor
@AllArgsConstructor
public enum ResultConstants {
    /*-------------------编辑资料-------------------*/
    NICK_NAME_TOO_LONG(300, "昵称最多8个字符"),
    ILLEGAL_MONOLOGUE(301, "内心独白违规"),
    ILLEGAL_NICKNAME(302, "昵称涉及敏感词"),

    /*-----Basic-----*/
    SUCCESS(200, "ok"),
    FAIL(500, "fail"),
    SYSTEM_PARAM_FAIL(400, "参数错误"),
    SYSTEM_TOKEN_FAIL(401, "会话无效，请重新登录"),
    SYSTEM_SIGNATURE_FAIL(402, "签名错误"),
    SYSTEM_DATA_FAIL(500, "系统数据异常"),
    SYSTEM_SERVER_BUSY(501, "服务器繁忙"),
    /*-------------------登录-------------------*/
    LOGIN_URL_ERROR(600, "登录回调路径错误"),
    JPUSH_LOGIN_ERROR(601, "极光登录失败，请重新登录"),
    ALIYUN_LOGIN_ERROR(602, "阿里云登录失败，请重新登录"),
    GENDER_TYPE_ERROR(603, "性别类型错误"),
    DEVICE_NOT_EXIST(604, "设备不存在"),
    DEVICE_REGISTER_TOO_MUCH(605, "一个设备只能注册3个账号"),
    LOGIN_BANNED(606, "账号ID：*已被锁定，请联系客服。\n客服QQ：80056867"),
    WITHDRAW_BANNED(607, "提现受限，请联系客服"),
    LOG_OFF(608, "您账号已经注销"),
    DEVICE_BANNED(609, "帐号异常：*已被锁定，请联系客服。\n客服QQ：80056867"),
    APPLE_EXPIRED(610, "苹果token过期"),
    APPLE_ILLEGAL(611, "苹果token非法"),
    APPLE_FAIL(612, "苹果token验证失败"),
    INVITATION_CODE_ERROR(613, "邀请码不正确"),
    PHONE_NULL_ERROR(614,"手机号不能为空"),
    PHONE_STYLE_ERROR(615,"手机号格式错误"),
    LOGIN_TYPE_NULL_ERROR(616,"登录类型为空或不存在！"),
    PASSWORD_NULL_ERROR(617,"密码不能为空"),
    USERNAME_PASSWORD_ERROR(618,"账号或密码错误"),
    INSERT_SUCCESS(619,"用户新增成功！"),
    PHONE_NOT_EXIST(620,"手机号不存在！"),
    PHONE_EXIST(621,"手机号存在！"),
    OPENID_NULL_ERROR(622,"openid不能为空！"),
    PHONE_NO_BINDING(621,"未绑定手机号！"),
    UNION_ID_NO_EQUAL(622,"同一个openId对应的unionId不相等！"),
    WAY_NOT_EXIST(623,"渠道不存在！"),

    /*-------------------短信验证-------------------*/
    SMS_SEND_ERROR(700, "验证码发送失败"),
    SMS_SYSTEM_ERROR(701, "验证码发送系统异常"),
    SMS_CODE_WRONG(702, "验证码错误"),
    SMS_CODE_OR_MOBILE_WRONG(702, "验证码或者旧手机号错误"),
    SMS_DEVICE_WRONG(703, "设备型号不匹配"),
    SMS_CODE_OVERTIME(704, "验证码超时"),
    SMS_CODE_STATUS_USED(705, "验证码已使用"),
    SMS_SEND_OVERTIMES(706, "今日发送次数已用完"),
    SMS_SEND_TYPE_WRONG(707, "发送验证码类型错误"),
    SMS_SEND_COLD_TIME(708, "两次验证码发送间隔不能小于1分钟"),
    /**
     * 身份证验证性别
     */
    IDCARD_GENDER_ERROR(708, "身份证性别不一致"),


    /*--------------------文件-----------------*/
    FILE_NOT_EXIST(800, "文件不存在"),
    FILE_UPLOAD_OSS_TOKEN_ERROR(801, "获取上传令牌失败"),
    UPLOAD_TYPE_ERROR(802, "上传文件类型有误"),
    UPLOAD_FILE_NAME_ERROR(803, "上传文件名称有误"),
    UPLOAD_FILE_CORRUPTED(804, "文件损坏，请重新上传"),
    UPLOAD_PHOTO_LIMIT(805, "照片最多上传5张"),
    UPLOAD_VOICE_LIMIT(806, "语音时长太短"),
    UPLOAD_ERROR(807, "文件上传错误"),
    REGION_ERROR(808, "区域不存在或者配置错误"),

    /*--------------------支付-----------------*/
    PAY_TYPE_NOT_EXIST(900, "支付类型不存在"),
    ORDER_STATUS_SUCCESS(901, "订单已支付，无需重复支付"),
    NO_BIND_WX(902, "用户未绑定微信"),
    NO_PAY_WAY(903, "支付方式不存在"),
    ORDER_HAS_REFUNDED(904, "该订单已退款成功"),
    PAY_INFO_NOT_EXIST(905, "该订单没查询支付信息"),
    REFUND_MONEY_TOO_LARGE(906, "总退款金额大于支付金额"),

    /*-----User (StartCode: 1000)--------------*/
    USER_PASSWORD_ERROR(1000, "密码错误"),
    USER_NOT_FOUND(1001, "用户不存在"),
    USER_SIGNED(1002, "亲，今天已经签到了哟"),
    USER_IS_NOT_INVITER(1003, "亲，您还未邀请任何人哟"),
    USER_RED_PACKET_IS_NOT_FOUND(1004, "红包不存在"),
    USER_RED_PACKET_LOG_IS_EXIST(1005, "您已领取该红包"),
    USER_RECEIVE_RED_PACKET_IS_NOT_ALLOW(1006, "亲，您还未达到目标哟~"),
    USER_SIGNED_OVER_TIME(1007, "签到超期"),
    USER_SIGNED_PRIZE_IS_ERROR(1008, "签到礼品有误"),
    USER_WITHDRAW_AMOUNT_IS_ERROR(1009, "提现金额有误"),
    USER_REPORT_BLANK_ERROR(1010, "举报投诉内容不能为空"),
    USER_FEEDBACK_BLANK_ERROR(1011, "反馈内容不能为空"),
    USER_DATA_NOT_FOUND(1012, "数据没有找到 "),
    USER_AMOUNT_NOT_ENOUGH(1013, "余额不足"),
    USER_SETTING_SCORE_NOT_ENOUGH(1014, "魅力值不足"),
    USER_INTERESTS_TOO_MUCH(1015, "最多只能选择五个标签"),
    USER_HAS_ACCOUNT(1016, "该账户已存在"),
    USER_PAY_ACCOUNT_IS_BIND(1017, "支付账户已绑定"),
    USER_LOGIN_ACCOUNT_IS_BIND(1018, "该登录账户已绑定"),
    USER_ACCOUNT_AUTH_EXCEPTION(1019, "认证查询异常，接口调用失败"),
    USER_PAY_IS_FAIL(1020, "支付失败"),
    USER_PAY_IS_EXCEPTION(1021, "支付异常"),
    USER_WITHDRAW_LIMIT(1022, "提现受限"),
    USER_ACCOUNT_IS_NOT_BIND(1023, "支付账户未绑定"),
    USER_ACCOUNT_IS_NOT_FOUND(1024, "未找到支付账户"),
    USER_PARAM_IS_NOT_NULL(1025, "参数不能为空"),
    USER_ACCOUNT_UPDATE_COUNT_LIMIT(1026, "账户修改次数当月达到上限"),
    USER_FIRST_CHARGE_COUNT_LIMIT(1027, "首充已达上限"),
    USER_WITHDRAW_STATUS_ERROR(1028, "只有未审核的才能进行操作哟"),
    USER_OBJECT_IS_EXIST(1029, "对象已存在"),
    USER_IS_STATUS_ING(1030, "只有待处理的订单才能处理哟"),
    USER_TODAY_IS_WITHDRAW(1031, "您今天已经提现了哦，请明天再来"),
    USER_WITHDRAW_NON_CONDITION(1032, "您的提现不符合要求哦"),
    USER_EXCHANGE_AMOUNT_NOT_ENOUGH(1033, "您的余额不足哟"),
    USER_VIOLATION(1034, "用户涉嫌违规"),
    USER_IS_NOT_MAN(1035, "抱歉您不是男用户"),
    USER_LOG_OFF(1036, "用户已注销"),
    USER_FACE_VERIFY(1037, "您已真人认证"),
    USER_BANNED(1038, "该用户已被封禁"),
    FAMILY_NOT_UNMET_REQUIREMENT(1039, "您当前暂不满足创建要求"),
    FAMILY_ACHIEVE_MAX_VALUE(1040, "家族达到最大值"),
    FAMILY_NAME_EXISTS(1041, "家族名称已存在，创建不成功"),
    FAMILY_STATUS_IS_BAN(1042, "该家族已被封禁"),
    FAMILY_APPLY_PROCESSED(1043, "该申请已被处理"),
    FAMILY_APPLY_OPERATION_STATUS_IS_ERROR(1044, "申请操作状态错误"),
    FAMILY_APPLY_OPERATION_IS_ILLEGAL(1045, "操作非法"),
    FAMILY_APPLY_OPERATION_AUTH_NOT_ENOUGH(1046, "操作权限不足"),
    FAMILY_APPLY_JOIN_MAX_COUNT(1047, "加入家族达到最大数量"),
    FAMILY_MEMBER_MAX_COUNT(1048, "家族成员达到最大数量"),
    FAMILY_APPLY_JOINED_OTHER_FAMILY(1049, "您已加入其他家族"),
    FAMILY_THIS_FAMILY_IS_JOINED(1050, "您已经加入过该家族了哟"),
    FAMILY_APPLY_IS_EXISTS(1051, "您已发送过加入请求，请耐心等待哟"),
    FAMILY_NOT_FOUND(1052, "暂无此家族"),
    FAMILY_NOT_JOIN(1053, "您还未加入该家族"),
    FAMILY_MEMBER_NOT_EXISTS(1054, "当前家族未有该成员"),
    FAMILY_PATRIARCH_NOT_ALLOW_JOIN(1055, "族长不能加入其他家族哟"),
    FAMILY_NOT_ALLOW_SIGN_OUT(1056, "族长不能退出家族哟"),
    FAMILY_NO_EXISTS(1057, "家族不存在"),
    FAMILY_ATTENDANCE_FAIL(1058, "签到失败"),
    FAMILY_SET_POSITION_LIMIT(1059, "设置职位已达上限"),
    FAMILY_LEVEL_LIMIT(1060, "您的等级不符合要求哦"),
    FAMILY_NOT_FACE_VERIFY(1061, "您还未真人认证"),
    FAMILY_BOTH_NOT_PASS(1062, "创建条件不满足"),
    FAMILY_JOINED_NOT_ALLOW_CREATE(1063, "您已经加入过其他家族了"),
    FAMILY_LEVEL_OVER(1064, "输入数字不能超过最大等级"),
    VIP_PRIVILEGE_NOT(1069, "亲,只有伯爵以上才能设置哦"),
    USER_PHONE_IS_NOT(1070, "您当前还未绑定手机"),
    USER_NOT_PASS(1071, "要满足充值要求才可以领取哦"),
    IS_RECEIVED(1072, "您本月已领取哦"),
    RECHARGE_PHONE_FAIL(1073, "充值话费失败"),
    FAMILY_MEMBER_NOT_EXSIT(1074, "抱歉，你并非该家族成员"),
    DISMISS_PROTECTOR_FAIL(1075, "解除守护关系失败"),
    BEFORE_THEt_TIME(1077, "还未到期时间领取哦"),

    /*-----Call (StartCode: 2000)-----*/
    CALL_STATE_ERROR(2000, "通话状态错误"),

    CALL_TYPE_ERROR(2001, "通话类型错误"),

    LOCAL_CALLING(2002, "自己正在通话中"),

    REMOTE_CALLING(2003, "对方正在通话中"),

    REMOTE_PRICE_HIGH(2004, "对方设置了较高的单价"),

    INTIMACY_NOT_ENOUGH(2005, "亲密度不够，不能打电话"),
    VIDEO_CALL_MATCH_WAITING(2006, "视频匹配中"),
    VOICE_CALL_MATCH_WAITING(2007, "语音匹配中"),
    MATCH_CONFIRM_TIME_OUT(2008, "匹配确认超时"),
    MATCH_MUST_HAS_VOICE(2009, "您还没有语音签名"),
    MATCH_MUSH_VERIFY(2010, "您还没有真人认证"),

    YOU_ON_BLACKLIST(2011, "您已被对方拉入黑名单"),
    DO_NOT_DISTURB(2012, "对方设置了免打扰"),
    MATCH_PRICE_NOT_ENOUGHT(2013, "您还没有真人认证"),

    /*-----消息 (StartCode: 3000)-----*/
    TENCENT_IM_GET_SIG_ERROR(3000, "获取im密码错误"),

    /**
     * -- 审核 --
     */
    PICTURE_VIOLATION(20001, "图片违规"),
    PICTURE_MAY_BE_VIOLATION(20002, "图片可能违规"),
    PICTURE_SUSPECTED_POLITICS(20003, "疑似涉政人物"),
    PICTURE_VIOLENT_SENSITIVE(20004, "暴恐敏感图片"),
    PICTURE_ADVERTISE_TEXT(20005, "包含广告文本"),
    PICTURE_PORNOGRAPHIC_ADVERTISE_TEXT(20006, "包含色情广告文本"),
    PICTURE_INCLUDE_QR_CODE(20007, "包含二维码"),
    PICTURE_CHECK_FAIL(20008, "图片审核异常"),
    VOICE_CHECK_ING(20009, "语音审核中"),


    /**
     * -- 任务中心 --
     * -- 邀请任务 --
     **/
    TASK_NOT_EXIST(4000, "任务不存在"),
    TASK_FINISHED(4001, "任务已完成"),
    TASK_REPETITION(4002, "任务重复"),
    TASK_NO_CONDITION(4003, "条件不满足"),
    TASK_NO_TASK(4004, "没有任务数据"),
    TASK_INVITETASK_FRIENDS_CONFIG_ERROR(4005, "邀请好友奖配置数据错误"),
    TASK_NO_TYPE(4006, "不存在任务类型"),
    TASK_TYPE_NO_REWARD(4007, "该任务不能领取红包"),
    TASK_NO_REPETITION_GET_REWARD(4008, "不能重复领取"),
    TASK_GET_REWARD_FAIL(4009, "红包领取失败"),
    TASK_NO_INVITER(4010, "无直接邀请人"),
    TASK_NO_INVITER_TYPE_CONFIG(4011, "土豪奖，女神奖配置数据不存在"),
    TASK_INVITER_EARNINGS_NO(4012, "邀请无收益"),
    TASK_GETREWARD_TOO_OFTEN(4013, "领取太频繁"),
    /**
     * -- 动态 --
     */
    POST_LIKED(5002, "你已经赞过啦"),
    POST_NOT_EXIST(5003, "动态不存在"),
    ILLEGAL_DYNAMIC(5004, "动态涉及敏感词"),
    POST_COMMENT_NOT_EXIST(5005, "评论不存在"),
    POST_COMMENT_ILLEGAL_DYNAMIC(5006, "评论回复涉及敏感词"),

    /**
     * -- 首页 --
     */
    SEARCH_TYPE_ERROR(6002, "搜索类型错误"),
    SEARCH_NO_LOCATION(6003, "定位未开启"),
    LOCATION_ADCODE_NULL(6005, "adCode不能为空"),
    LOCATION_ADCODE_NON_EXIST(6004, "adCode不存在"),
    LOCATION_LON_LAT_NULL(6006, "坐标不能为空"),
    LOCATION_TOO_SHORT_INTERVAL(6007, "坐标更新太频繁"),
    LOCATION_LON_LAT_ERROR(6008, "位置信息错误"),
    SEARCH_GENDER_ERROR(6009, "搜索性别错误"),
    LOCATION_IP_ERROR(6010, "IP错误"),
    LOCATION_IP_FREQUENTLY(6011, "IP定位频繁"),
    /**
     * -- IM消息回调错误码 --
     */
    IM_USER_AMOUNT_NOT_ENOUGH(121000, "余额不足"),

    IM_CALL_BACK_SYSTEM_ERROR(121001, "系统异常"),

    IM_GIFT_NOT_VIP(121002, "专属礼物只有贵族可以发送"),

    IM_IMAGE_INTYMACY_LOW(121003, "亲密度达到20.0才能发送图片哦"),
    IM_SENDER_IN_BLACKLIST(121004, "您已被该用户加入黑名单"),
    IM_SENDER_HAS_BEEN_BAN(121005, "您已被系统封禁，无法发送消息"),
    IM_RECEIVER_HAS_BEEN_BAN(121006, "该用户已被封禁"),
    IM_HAS_SENSITIVE_WORD(121007, "该条消息涉及敏感词"),
    IM_CHATUP_SELF(121008, "不能搭讪自己"),
    IM_CHATUP_INTERCEPT(121009, "搭讪消息拦截"),
    IM_FEMALE_OVER_REPLY_TIMES(121010, "您的回复次数已超过限制，需要真人认证才能继续回复哦"),

    /**
     * -- 群聊消息错误码 --
     */
    GROUP_REDPACKET_QTY_OVER_AMOUNT(131000, "红包数量不能大于红包金额"),

    GROUP_REDPACKET_QTY_OVER_MEMBERS(131001, "红包数量不能大于群成员总数"),

    GROUP_REDPACKET_QTY_OVER(131002, "红包数量不能大于100"),

    GROUP_REDPACKET_EMPTY(131003, "红包已经领完"),

    GROUP_JOIN_FULL(131004, "当前群聊已爆满，升级贵族才可以插队哦"),

    GROUP_JOIN_KICK(131005, "您已被踢出群聊，10分钟后才能加入哦"),

    GROUP_JOIN_KICK_NOT_ALLOW(131006, "权限不足，无法踢出对方"),

    GROUP_JOIN_BANNED_NOT_ALLOW(131006, "权限不足，无法禁言对方"),

    GROUP_MEMBERS_ARE_FULL(131007, "当前群成员已满"),

    GROUP_DELETE_ERROR(131008, "删除房间异常"),

    GROUP_MODIFY_ERROR(131009, "删除房间异常"),

    GROUP_BANNED_MAX(131010, "今日已达到最大禁言次数"),

    GROUP_KIC_MAX(131011, "今日已达到最大踢人次数"),

    GROUP_MEMBER_NOT_EXIST(131012, "该用户不在当前群聊"),

    /**
     * --console--
     */
    /*-----后台管理 (StartCode: 10000)-----*/
    SYSTEM_RUN_ERROR(10000, "接口执行异常"),

    SYSTEM_PERMIT_REJECT(10001, "没有该模块的访问权限"),

    SYSTEM_TIME_OUT(10002, "登入过期，请重新登录"),

    TRUTH_NOT_EXIST(10003, "该真心话不存在"),
    PHRASE_NOT_EXIST(10004, "该常用语不存在"),
    CAR_NOT_EXIST(10005, "该座驾不存在"),

    GROUP_EXIST(10006, "房间已存在"),
    TIME_INTEVAL_TOO_LONG(10007, "时间间隔太长"),
    POST_STATUS_ERROR(10008, "动态状态错误"),
    USER_NOT_CHOICE(10009, "没有传用户参数"),
    EARNING_RATIO_OUT_BOUND(10010, "分成比例越界"),
    VIP_EXPIRE_NOT_CHOICE(10011, "请填写到期时间"),
    USER_ROLE_PARAM_ERROR(10012, "用户角色值错误"),
    CHAT_UP_GIFT_ANIM_NO_NUll(10013, "搭讪礼物动图不能为空"),
    MUST_BE_NUMBER(10014, "必须是数字"),

    GIVE_VIP_LEVEL_ERROR(10015, "赠送vip级别比原等级低,或者赠送日期错误"),
    GIVE_CAR_ERROR(10016, "赠送座驾日期错误"),
    FAMILY_LEVEL_EXIST(10017, "该等级已存在"),
    FAMILY_CONTRIBUTION_EXIST(10018, "等级所需贡献值不能重复"),
    FAMILY_LIMIT_CONDITION_ERROR(10019, "需求等级数值错误"),
    BEAUTIFUL_HORN_EXIST(10020,"靓号已存在"),
    GIFT_SORT_OUT_RANGE(10021, "礼物排序过大"),


    /*------推广后台--------------*/
    UNION_APP_IS_NOT_FOUND(11000, "暂未上传基本APK，请联系管理员"),
    UNION_CHANNLE_IS_NOT_FOUND(11001, "apk不存在"),


    ACCOUNT_LOCKED(13000, "账号已锁定，请联系管理员"),
    ACCOUNT_EXIST(13001, "该账号已存在"),

    ;


    public Integer status;

    public String message;

    ResultConstants(int status, String message) {
        this.status = status;
        this.message = message;
    }
    /**
     * 获取所有回复码
     *
     * @return
     */
    public static LinkedHashMap<Integer, String> getArrayMessage() {
        LinkedHashMap<Integer, String> responseMessages = new LinkedHashMap<>();
        for (ResultConstants statusEnum : ResultConstants.values()) {
            responseMessages.put(statusEnum.status, statusEnum.message);
        }
        return responseMessages;
    }
}
